<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Mod_search extends CI_Controller {
    public $setting = '';
    private $per_page = 2;
    private $total_rows = 6;
    function  __construct(){
        parent::__construct();
        $this->setting =$this->common_model->getone('setting',array('id'=>1));
    }
    function index(){
        $this->load->view('mod_search/search');
    }
    function views(){
       
        $this->load->view('mod_search/views',array(
                                                'sx'=>$this->common_model->getdata('product_manufacturer',array('publish'=>1),array('id','title'),array('id','DESC')),
                                                'cate'=>$this->common_model->getdata('product_category',array('publish'=>1),array('id','title'),array('id','DESC'))
                                            ));
    }
    function phantrang(){
        $this->load->library('pagination');
        $config['base_url'] = base_url().$this->uri->segment(1).'/';
        $config['total_rows'] = $this->total_rows;
        $config['per_page'] = $this->per_page;
        $config['uri_segment'] = 2;
        $config['num_links'] = 12;
        $this->pagination->initialize($config);
    }
}